<?php 
	$item=$this->item;
	$status=$item['status'];
	$feature=$item['feature'];
	if(empty($status)) $status=0;
	if(empty($feature)) $feature=0;
	
	$name 			= $this->formText('name',$item['name'],array('class'=>'txtmedium'));
	$picture 		= $this->formFile('picture',array('style'=>'width: 250px'));
	$GroupCategory 	= $this->cmsSelect('cat_id',$item['cat_id'],$this->category,
										array('style'=>'width:200px','size'=>10));
	$summary 		= $this->formTextarea('summary',$item['summary'],array('rows'=>'10'));									
	$content		= $this->cmsReplaceString($item['content']);
	$content		= $this->cmsEditor('content',$content,array('toolbar'=>'Default','language'=>'vi'));
	
	$options 	= array('Inactive','Active');
	$status 	= $this->formRadio('status',$status,null,$options, ' ');		
	
	$options1 	= array('No','Yes');
	$feature 	= $this->formRadio('feature',$feature,null,$options1, ' ');
	
	$meta_description = $this->formTextarea('meta_description',$item['meta_description'],array('rows'=>'5'));
	$meta_keyword = 	$this->formTextarea('meta_keyword',$item['meta_keyword'],array('rows'=>'5'));
	
	$imgArr 		= !empty($item['picture'])?array( FILES_URL . '/products/images100x100/'.$this->Item['picture']):'';
	//$image 	= $this->cmsUserAvatar($inputInfo, $imgArr);
	if(!empty($item['picture'])){
	  	$urlimage   = FILES_URL . '/news/images100x100/'. $item['picture'];
	  	$imgimage  = '<span><img src="' . $urlimage . '" width="" height="40"></span>'; 
	  	$picture  = $imgimage ."<br/>" . $this->formFile('picture',array('style'=>'margin-left:173px'));	
	}else{
		$picture  = $this->formFile('picture',array('style'=>'margin-left:5px'));
	}
 	$current_stadium = $this->formHidden('current_stadium_picture',$item['picture']);  
	
	$Input = array(
					array('Label'=>$this->translate('Name'),'input'=>$name,'info'=>0),
					array('Label'=>$this->translate('Picture'),'input'=>$picture,'info'=>0),
					array('Label'=>$this->translate('Category'),'input'=>$GroupCategory,'info'=>0),
					array('Label'=>$this->translate('Status'),'input'=>$status,'info'=>0),
					array('Label'=>$this->translate('Feature'),'input'=>$feature,'info'=>0),
					array('Label'=>$this->translate('Summary'),'input'=>$summary,'info'=>0),
					array('Label'=>$this->translate('Content'),'input'=>$content,'style'=>'margin-left:174px'),
					array('Label'=>'Meta Description','input'=>$meta_description,'info'=>0),
					array('Label'=>'Meta Keyword','input'=>$meta_keyword,'info'=>0),
					);
	if(count($this->errors)>0){
		$errors = $this->formErrors($this->errors,array('id'=>'errors'));
	}
?>
<form name="appForm" method="post" action="" enctype="multipart/form-data">

                        <?php echo $this->render('toolbar.php')?>
                        <div class="clr"></div>
                        <?php //echo $this->render('sublink.php')?>
                        <?php echo $errors;?>

                        <!-- BEGIN: CONTENT -->
                        <div id="element-box">
                            <div class="t">
                                <div class="t">
                                    <div class="t"></div>
                                </div>
                            </div>
                            <div class="m">
                                <!-- BEGIN: ELEMENT BOX -->
						<div id="adminfieldset">
                             <div class="adminheader">Detail</div>
								
								<?php echo $this->partialLoop('rows.php',$Input) . $current_stadium ;?>
                                
							</div>
							
                                <!-- END: ELEMENT BOX -->	
                              <div class="clr"></div>
                            </div>
                            <div class="b">
                                <div class="b">
                                    <div class="b"></div>
                                </div>
                            </div>
                        </div>
                        <!-- END: 	CONTENT -->
                    </form>